/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * articulos_sie_traspaso_requisicion_detalle.java
 *
 * Created on 5/07/2011, 12:08:58 PM
 */

package sie_invdis;



import java.sql.*;
import javax.swing.*;

import javax.swing.JOptionPane;
import javax.swing.JTable;
import javax.swing.JTable.*;
import java.awt.*;
import java.util.Date;
import java.util.Calendar;
import java.text.SimpleDateFormat;
import java.text.ParseException;
import java.text.*;

/**
 *
 * @author Michelle
 */
public class articulos_sie_traspaso_requisicion_detalle extends javax.swing.JFrame {

    private javax.swing.table.DefaultTableModel jtable_modelo_traspaso;

    private SimpleDateFormat formateador = new SimpleDateFormat("dd-MM-yyyy");
    private SimpleDateFormat formateadoresta = new SimpleDateFormat("yyyy-MM-dd");

    bd_conexion x = new bd_conexion() ;
    //se creaa la variable resultset
    ResultSet rs = null;
    int statusdocumento=0,yacarguefoto=0,yacarguecliente=0,controltab=0;
    private String textohtml="";
    /** Creates new form articulos_sie_traspaso_requisicion_detalle */
    public articulos_sie_traspaso_requisicion_detalle() {
      
        initComponents();

    
 }

    public articulos_sie_traspaso_requisicion_detalle(String foliorequi) {
        
        this.iniciar_modelo_detallerequi();
        initComponents();
        this.carga_datos_encabezado(1, foliorequi);
        this.carga_datos_detalle(5,foliorequi);
        this.loadcombo_statusrequi();
    jt_foliosdetalle.getColumnModel().getColumn(0).setPreferredWidth(60);//Folio
    jt_foliosdetalle.getColumnModel().getColumn(1).setPreferredWidth(15);//status
    jt_foliosdetalle.getColumnModel().getColumn(2).setPreferredWidth(60);//doc ant.
    jt_foliosdetalle.getColumnModel().getColumn(3).setPreferredWidth(150);//fecha
    jt_foliosdetalle.getColumnModel().getColumn(4).setPreferredWidth(60);//fecha llega tienda
    jt_foliosdetalle.getColumnModel().getColumn(5).setPreferredWidth(35);//f.recepcion
    jt_foliosdetalle.getColumnModel().getColumn(6).setPreferredWidth(35);//Dias Trans.
    jt_foliosdetalle.getColumnModel().getColumn(7).setPreferredWidth(120);//guia
    jt_foliosdetalle.getColumnModel().getColumn(8).setPreferredWidth(45);//guia

    controltab=1;
    }

    private void iniciar_modelo_detallerequi()
{
        jtable_modelo_traspaso=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_traspaso.addColumn("<html><b>Temp. Entrada</b></html>");
        jtable_modelo_traspaso.addColumn("<html><b>id</b></html>");
        jtable_modelo_traspaso.addColumn("<html><b>Clave</b></html>");
        jtable_modelo_traspaso.addColumn("<html><b>Descripcion</b></html>");
        jtable_modelo_traspaso.addColumn("<html><b>Item</b></html>");
        jtable_modelo_traspaso.addColumn("<html><b>Cantidad</b></html>");
        jtable_modelo_traspaso.addColumn("<html><b>Precio</b></html>");
        jtable_modelo_traspaso.addColumn("<html><b>Observaciones</b></html>");
        jtable_modelo_traspaso.addColumn("<html><b>Foto</b></html>");
        jtable_modelo_traspaso.addColumn("<html><b>Pz surtidas</b></html>");
        jtable_modelo_traspaso.addColumn("<html><b>P.may</b></html>");
}


private void loadcombo_statusrequi(){


            try
            {
               rs = x.sieuno_executediversosv2("select * from x1distribucion_almacen_traspa_requi_status(1,'','') as (id smallint,descrip text,observ text);",variables_global.getconexiongral());
               while (rs.next())
                    {
                      this.jcmbx_statusdocto.addItem(rs.getString("id")+":"+rs.getString("descrip"));
                    }
             }
            catch(Exception e)
            {
                System.out.println(e.getMessage());
            }
    }

private void carga_datos_encabezado(int opbus,String tbusca)
{
       String fechaorigen="",fechaentrega="";
       DecimalFormat miformat = new DecimalFormat("###,###,###,###");
       //invoco al metodo que trae el recordset de datos
       String texto="select * from x1distribucion_almacen_traspa_requi_catalogo('"+variables_global.getcliente_tistribucion()+"',"+opbus+",'"+tbusca+"',"+Integer.valueOf(variables_global.getidtiendami())+") as (iddocum integer,status smallint,idempleado integer,docsiguiente integer,fechadocto date,fechasurtido date,fechallegotienda date,idcliedistribucion character varying(12),idclientesol character varying(12),obserdocto text,usuario character varying(12),flete numeric,guia character varying(60),fechaenvio date,idalma smallint,canpiezassolicita numeric,canpiezassurtido numeric,importecosto numeric,importeprecio numeric,nombrecliente character varying(60),direcliente character varying(50),nombrecliesol character varying(60),dirclientesol character varying(50),empleadonombre character varying(50),nombrepaterno character varying(50),nombreamaterno character varying(50),describestatus text);";
        try
         {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                   this.jtf_foliotienda.setText(rs.getString("iddocum"));
                   this.tf_status.setText(rs.getString ("status")+":"+rs.getString ("describestatus"));
                   this.jcmbx_statusdocto.addItem(rs.getString ("status")+":"+rs.getString ("describestatus"));
                   this.tf_tiendasolicita.setText(rs.getString ("idclientesol")+":"+rs.getString ("nombrecliesol"));
                   fechaorigen=""+this.fechaeuropea(rs.getString("fechadocto"))+":"+DiaSemana(this.fechaeuropea(rs.getString ("fechadocto")))+" ";
                   this.jtf_fechasolicitatienda.setText(fechaorigen);
                   this.jtf_almacenprovee.setText(rs.getString ("idcliedistribucion")+":"+rs.getString ("nombrecliente"));
                   this.jtf_idproveedor.setText(rs.getString ("idcliedistribucion"));
                   if(rs.getString("fechasurtido") != null )
                        {
                            fechaentrega=""+this.fechaeuropea(rs.getString("fechasurtido"))+":"+this.DiaSemana(this.fechaeuropea(rs.getString("fechasurtido")))+"";
                        }
                   this.jtf_fecharsurtido.setText(fechaentrega);
                   fechaentrega="";
                   if(rs.getString("fechallegotienda") != null )
                        {
                            fechaentrega=""+this.fechaeuropea(rs.getString("fechallegotienda"))+":"+this.DiaSemana(this.fechaeuropea(rs.getString("fechallegotienda")))+"";
                        }
                   this.jtf_fecharecepcion.setText(fechaentrega);
                   
                  

                   this.jtf_piezaenvia.setText(miformat.format(rs.getFloat("canpiezassolicita")));
                   this.jtf_piezasrecibidas.setText(miformat.format(rs.getFloat("canpiezassurtido")));
                   this.jtf_diferencia.setText(miformat.format(rs.getFloat("canpiezassolicita")-rs.getFloat("canpiezassurtido")));
                   this.jtf_elaboro.setText(rs.getString("empleadonombre")+" "+rs.getString("nombrepaterno")+" "+rs.getString("nombreamaterno"));
               

                   this.jep_observaenvio.setText(rs.getString("obserdocto"));
                   this.jtf_obser_update.setText(rs.getString("obserdocto"));

                   this.jtf_importeprecio.setText(miformat.format(rs.getFloat("importeprecio")));
                  
                   //statusdocumento=rs.getInt("idstatus");

                    //if (statusdocumento==1)
                      //  {
                        //    this.jtf_piezasrecibidas.setText("0");
                        //}
                   
                }
        }
        catch(Exception e)
            {
                System.out.println(e.getMessage());
            }

}

private void carga_datos_detalle(int opcion,String folio)
{
    //String textohtml="";
    while(jtable_modelo_traspaso.getRowCount()>0)jtable_modelo_traspaso.removeRow(0);
    textohtml="<tr><th>Clave Articulo/Descripcion/foto</th><th>Clave Articulo/Descripcion/foto</th><th>Clave Articulo/Descripcion/foto</th><th>Clave Articulo/Descripcion/foto</th></tr>";
        int fila=0;
        float importe=0;
       DecimalFormat miformat = new DecimalFormat("###,###,###,###.##");
       Object[] fnewRow = new Object[11];
       //invoco al metodo que trae el recordset de datos
       String texto="select * from x1distribucion_almacen_traspa_requi_detallev2("+opcion+",'"+folio+"','"+this.jtf_idproveedor.getText()+"','','') as (idreg integer,iddocto integer,idarticulo character varying(16),cansolicitada numeric,cansurtida numeric,costoarti numeric,precioarti numeric,observaparti text,importecosto numeric,importeprecio numeric,descripcion character varying(80),fam_arti integer,subfam integer,tementrada character varying(25),item character varying(80),precio1 numeric,nombresubfamilia character varying(50),idproducto integer,lugaralmacen text,precio2 numeric,idviaje smallint,exi double precision);";
        try
         {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                    importe+=rs.getFloat("precio2")*rs.getFloat("cansolicitada");
                    fnewRow[0]=rs.getString("lugaralmacen");
                    fnewRow[1]=rs.getString("idproducto");
                    fnewRow[2]=rs.getString("idarticulo");
                    fnewRow[3]=rs.getString("descripcion");
                    fnewRow[4]=rs.getString("item");
                    fnewRow[5]=miformat.format(rs.getFloat("cansolicitada"));
                    fnewRow[6]=miformat.format(rs.getFloat("precioarti"));
                    fnewRow[7]=" Exist. Bod:"+miformat.format(rs.getFloat("exi"))+" "+rs.getString("observaparti");
                    
                    fnewRow[9]=miformat.format(rs.getFloat("cansurtida"));

                    if(variables_global.getnivelusu()<3)
                                {
                                    fnewRow[8]=miformat.format(rs.getFloat("costoarti"));
                                    fnewRow[10]=miformat.format(rs.getFloat("precio2"));
                                }
                            else
                                {
                                    fnewRow[8]="0";
                                    fnewRow[10]="0";
                                }
                    jtable_modelo_traspaso.addRow(fnewRow);
                    
                }
        }
        catch(Exception e)
            {
                System.out.println(e.getMessage());
            }
         this.jtf_importepreciomay.setText(miformat.format(importe));
}
private String  fechaeuropea(String fecha) {

         //resibe cadena de fecha en formato americano yyyy-MM-dd
        java.util.Date fechaestaeuropa=null;
       SimpleDateFormat formateadorestaeuropa = new SimpleDateFormat("dd-MM-yyyy");
       String cadenafecha="";
        try
         {
          fechaestaeuropa = formateadoresta.parse(fecha);
         }
        catch (ParseException e)
          {
             //Error, la cadena de texto no se puede convertir en fecha.
          }
       cadenafecha= formateadorestaeuropa.format(fechaestaeuropa);
       return cadenafecha;

    }
private String DiaSemana(String fe) {
         String dia = "";
       java.util.Date fecha=null;
         try
            {
             fecha = formateador.parse(fe);

           }
        catch (ParseException e)
            {
            //Error, la cadena de texto no se puede convertir en fecha.
            }
        Calendar cal= Calendar.getInstance();
        cal.setTime(fecha);
        //ojo para establecer o recetear cada parte de la fecha por separado
        //cal.set(Calendar.YEAR, fecha.getYear());
        //cal.set(Calendar.MONTH, fecha.getMonth());
        //cal.set(Calendar.DAY_OF_MONTH, fecha.getDay());
        int diaInt = cal.get(Calendar.DAY_OF_WEEK);
        switch (diaInt) {
            case 1:
                dia = "Domingo";
                break;
            case 2:
                dia = "Lunes";
                break;
            case 3:
                dia = "Martes";
                break;
            case 4:
                dia = "Miercoles";
                break;
            case 5:
                dia = "Jueves";
                break;
            case 6:
                dia = "Viernes";
                break;
            case 7:
                dia = "Sabado";
                break;

        }
        return dia;
    }
  private void carga_datos_clientesactualiza(int opcion,String textobusca)
    {
       String texto="select * from x1distribucion_terminados_ventas_clientes_catalogo("+opcion+",'"+textobusca+"','') as (id character varying(12),nombre character varying(60),direccion character varying(50),colonia character varying(50),poblacion character varying(40),cpcliente character varying(6),rfc character varying(15),curp character varying(20),telefono character varying(80),fax character varying(15),email character varying(80),clasif smallint,diascre smallint,limite numeric,descliente numeric,fechaultv date,fechaultp date,obser character varying(80),idstatus smallint,direccion2 character varying(80),statusdes character varying(40),descripcla character varying(40),atnven character varying(60),atncob character varying(60),acumcli numeric,idreg integer);";
       System.out.println(texto);
       try
       {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                       this.jtf_idcliente1.setText(rs.getString("id"));
                       this.jtf_cliente.setText(rs.getString("nombre"));
                       this.jtf_domcalle1.setText(rs.getString("direccion"));
                       this.jtf_domcolonia1.setText(rs.getString("colonia"));
                       this.jtf_dompobla1.setText(rs.getString("poblacion"));
                       this.jtf_email2.setText(rs.getString("email"));
                       this.jtf_cp.setText(rs.getString("cpcliente"));
                       this.jtf_rfc.setText(rs.getString("rfc"));
                       this.jtf_tel.setText(rs.getString("telefono"));
                       this.jtf_direccion2.setText(rs.getString("direccion2"));
                       this.jtf_atnventas.setText(rs.getString("atnven"));
                       this.jtf_atncobra.setText(rs.getString("atncob"));
                       this.jtf_observaciones1.setText(rs.getString("obser"));
                }
        }
        catch(Exception e)
            {
            System.out.println(e.getMessage());
            }
   }

private void verfotosestereporte()
    {
     int numerofilas=this.jtable_modelo_traspaso.getRowCount();
        //this.cambiartamanofilas();
             for(int i = 0 ;i < numerofilas; i++)
                {
                      jtable_modelo_traspaso.setValueAt("<html><head></head><body><p style=\"margin-top: 0\"><img src=\"http://"+variables_global.getHostfotos()+"/"+variables_global.getcarpetaaplicacion()+"/fotos/"+jtable_modelo_traspaso.getValueAt(i, 2).toString()+".JPG\" width=\"90\" height=\"60\" border=\"0\" alt=\"Foto\"></img></p></body></html>", i,8);
                      jt_foliosdetalle.setRowHeight(i, 70);
                }
           //
    }
private void quitarfotosestereporte()
    {
     int numerofilas=this.jtable_modelo_traspaso.getRowCount();
             for(int i = 0 ;i < numerofilas; i++)
                {
                      jtable_modelo_traspaso.setValueAt("", i,8);
                      jt_foliosdetalle.setRowHeight(i, 18);
                }
    }

private void imprimir(int pag,float ptotal)
    {
     this.objimpresora=new articulos_sie_traspaso_imprimir();

     this.objimpresora.setOneItem_cadenas_a_imprimir("Recepcion de Mercancia");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Fecha:"+this.jtf_fechasolicitatienda.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Folio:"+this.jtf_foliotienda.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Proveedor:"+this.jtf_almacenprovee.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Status Documento:"+this.tf_status.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Tienda Solicita:"+this.tf_tiendasolicita.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Observaciones:"+this.jep_observaenvio.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Total Piezas:"+this.jtf_piezaenvia.getText()+"");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("paginas:"+ pag + " de "+ptotal+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Responsable Almacen: ______________");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Empaco: ______________");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Recibio: ______________");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora.setObjeto_tabla(jt_foliosdetalle);
     this.objimpresora.imprimir_all(1,pag);
    }
private void imprimirlugar(int pag,float ptotal)
    {
     this.objimpresora=new articulos_sie_traspaso_imprimir();

     this.objimpresora.setOneItem_cadenas_a_imprimir("Recepcion de Mercancia");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Fecha:"+this.jtf_fechasolicitatienda.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Folio:"+this.jtf_foliotienda.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Proveedor:"+this.jtf_almacenprovee.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Status Documento:"+this.tf_status.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Tienda Solicita:"+this.tf_tiendasolicita.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Observaciones:"+this.jep_observaenvio.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Total Piezas:"+this.jtf_piezaenvia.getText()+"");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("paginas:"+ pag + " de "+ptotal+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Responsable Almacen: ______________");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Empaco: ______________");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Recibio: ______________");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora.setObjeto_tabla(jt_foliosdetalle);
     this.objimpresora.imprimir_all(2,pag);
    }
private void imprimirfortras(int pag,float ptotal)
    {
     this.objimpresora=new articulos_sie_traspaso_imprimir();

     this.objimpresora.setOneItem_cadenas_a_imprimir(": :    TRASPASO  : :");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Fecha:"+this.jtf_fechasolicitatienda.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Origen: PLAZA GALERIAS");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Destino: PLAZA TUXTLA");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Folio del Traspaso ::"+this.jtf_foliotienda.getText()+"");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("IDCODIGO/DES              PRECIO      ENVIADO/RECIBIDA");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Observaciones:"+this.jep_observaenvio.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Articulos Enviados:"+this.jtf_piezaenvia.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Articulos Recibidos:"+this.jtf_piezaenvia.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Diferencia:0.00");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("paginas:"+ pag + " de "+ptotal+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Realizo: ______________");
     this.objimpresora.setOneItem_cadenas_a_imprimir("OBS:");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Recibio: ______________");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora.setObjeto_tabla(jt_foliosdetalle);
     this.objimpresora.imprimir_all(3,pag);
    }

private void imprimirformayoreo(int pag,float ptotal)
    {
     this.objimpresora=new articulos_sie_traspaso_imprimir();

     this.objimpresora.setOneItem_cadenas_a_imprimir("S.Integral: : Venta : :");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Fecha:"+this.jtf_fechasolicitatienda.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Cliente: "+this.tf_tiendasolicita.getText());
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Destino: PLAZA TUXTLA");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Folio del Traspaso ::"+this.jtf_foliotienda.getText()+"");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("IDCODIGO/DES              PRECIO      ENVIADO/RECIBIDA");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Observaciones:"+this.jep_observaenvio.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Articulos Enviados:"+this.jtf_piezaenvia.getText()+"");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Articulos Recibidos:"+this.jtf_piezaenvia.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Importe: "+this.jtf_importepreciomay.getText());
     //this.objimpresora.setOneItem_cadenas_a_imprimir("paginas:"+ pag + " de "+ptotal+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Realizo: ______________");
     this.objimpresora.setOneItem_cadenas_a_imprimir("OBS:");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Recibio: ______________");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora.setObjeto_tabla(jt_foliosdetalle);
     this.objimpresora.imprimir_all(4,pag);
    }
private void imprimircarta(int pag,float ptotal)
    {
     this.objimpresora=new articulos_sie_traspaso_imprimir();

     this.objimpresora.setOneItem_cadenas_a_imprimir("S.I. Requisicion de Traspaso tienda a Bodega");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Fecha:"+this.jtf_fechasolicitatienda.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Folio:"+this.jtf_foliotienda.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Proveedor:"+this.jtf_almacenprovee.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Status Documento:"+this.tf_status.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Tienda Solicita:"+this.tf_tiendasolicita.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("Observaciones:"+this.jep_observaenvio.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     if((pag+1)>=ptotal)
        {
        this.objimpresora.setOneItem_cadenas_a_imprimir("Total Piezas:"+this.jtf_piezaenvia.getText()+"");
        this.objimpresora.setOneItem_cadenas_a_imprimir("Importe Precio:"+this.jtf_importeprecio.getText()+"");
        this.objimpresora.setOneItem_cadenas_a_imprimir("paginas:"+ pag + " de "+ptotal+"");
        this.objimpresora.setOneItem_cadenas_a_imprimir("Responsable Almacen: ______________");
        this.objimpresora.setOneItem_cadenas_a_imprimir("Empaco: ______________");
        this.objimpresora.setOneItem_cadenas_a_imprimir("Recibio: ______________");
        }
     this.objimpresora.setOneItem_cadenas_a_imprimir("paginas:"+ pag + " de "+ptotal+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora.setObjeto_tabla(jt_foliosdetalle);
     this.objimpresora.imprimir_all(5,pag);
    }
private void carga_datos_fotospaginacion(int pagina)
    {
        textohtml="";
        int nif=0,pag=pagina,nobjetotabla=this.jtable_modelo_traspaso.getRowCount(),nip=0,ni=0,fila=0;
        float totalpaginas=this.jtable_modelo_traspaso.getRowCount()/16;
        this.jlbl_paginas.setText("PAGINAS :"+totalpaginas);
             nif=((pag+1)*16);
             nip=((pag+1)*16)-16;
                        if (nif < nobjetotabla )
                            {
                                nobjetotabla=nif;
                            }
  System.out.println("tOTAL FILAS:"+this.jtable_modelo_traspaso.getRowCount()+" PAGINA ACTUAL "+pagina+" filainicial "+ nip + " Fila Final"+ nobjetotabla);
                    /*Impresion de los productos*/
                        for(ni=nip;ni<nobjetotabla;ni++)
                        {
                            System.out.println(" fila Actual "+ ni );
                                if (fila<=0)
                                    {
                                    	textohtml+= "<tr>";
                                    }
                                    fila++;
                                    textohtml+="<th>PZ= "+jtable_modelo_traspaso.getValueAt(ni, 5).toString()+" "+jtable_modelo_traspaso.getValueAt(ni, 2).toString()+"<br>"+jtable_modelo_traspaso.getValueAt(ni, 3).toString() +"Obs:"+jtable_modelo_traspaso.getValueAt(ni, 7).toString() + " $"+jtable_modelo_traspaso.getValueAt(ni, 6).toString()+ "<br>"+"<img src=\"http://"+variables_global.getHostfotos()+"/"+variables_global.getcarpetaaplicacion()+"/fotos/"+jtable_modelo_traspaso.getValueAt(ni, 2).toString()+".JPG\" width=230 height=190 border=0 alt=\"Foto Articulo\" />"+"</th>";
                                 if (fila>=4)
                                    {
                                        textohtml+= "</tr>";
                                        fila=0;
                                    }
                        }
         this.jepn_fotos.setText("<html><head></head><body><table>"+textohtml+"</table></body></html>");
         System.out.println(" este es html "+ textohtml );
    }
private void carga_datos_fotospaginacioncompleto(int pagina)
    {
        textohtml="";
        int nif=0,pag=pagina,nobjetotabla=this.jtable_modelo_traspaso.getRowCount(),nip=0,ni=0,fila=0;

                        for(ni=nip;ni<this.jtable_modelo_traspaso.getRowCount();ni++)
                        {
                                    if (fila<=0)
                                    {
                                    	textohtml+= "<tr>";
                                    }
                                    fila++;
                                    textohtml+="<th>PZ= "+jtable_modelo_traspaso.getValueAt(ni, 5).toString()+" "+jtable_modelo_traspaso.getValueAt(ni, 2).toString()+"<br>"+jtable_modelo_traspaso.getValueAt(ni, 3).toString() +"Obs:"+jtable_modelo_traspaso.getValueAt(ni, 7).toString() + " $"+jtable_modelo_traspaso.getValueAt(ni, 6).toString()+ "<br>"+"<img src=\"http://"+variables_global.getHostfotos()+"/"+variables_global.getcarpetaaplicacion()+"/fotos/"+jtable_modelo_traspaso.getValueAt(ni, 2).toString()+".JPG\" width=230 height=190 border=0 alt=\"Foto Articulo\" />"+"</th>";
                                 if (fila>=4)
                                    {
                                        textohtml+= "</tr>";
                                        fila=0;
                                    }
                        }
         this.jepn_fotos1.setText("<html><head></head><body><table>"+textohtml+"</table></body></html>");
         System.out.println(" este es html "+ textohtml );
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jTabbedPane2 = new javax.swing.JTabbedPane();
        jPanel3 = new javax.swing.JPanel();
        jLabel5 = new javax.swing.JLabel();
        tf_tiendasolicita = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        tf_status = new javax.swing.JTextField();
        jtf_foliotienda = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jtf_fechasolicitatienda = new javax.swing.JTextField();
        jLabel9 = new javax.swing.JLabel();
        jtf_almacenprovee = new javax.swing.JTextField();
        jLabel10 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jtf_fecharsurtido = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        jtf_elaboro = new javax.swing.JTextField();
        jLabel7 = new javax.swing.JLabel();
        jtf_fecharecepcion = new javax.swing.JTextField();
        jScrollPane2 = new javax.swing.JScrollPane();
        jep_observaenvio = new javax.swing.JEditorPane();
        jLabel1 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jtf_piezaenvia = new javax.swing.JTextField();
        jtf_piezasrecibidas = new javax.swing.JTextField();
        jLabel13 = new javax.swing.JLabel();
        jtf_diferencia = new javax.swing.JTextField();
        jtf_idproveedor = new javax.swing.JTextField();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jt_foliosdetalle = new javax.swing.JTable(){
            public boolean isCellEditable(int rowIndex, int mColIndex) {

                return false;

            }
        }
        ;
        jPanel4 = new javax.swing.JPanel();
        jScrollPane3 = new javax.swing.JScrollPane();
        jepn_fotos = new javax.swing.JEditorPane();
        jlbl_paginas = new javax.swing.JLabel();
        jbtn_anterior = new javax.swing.JButton();
        jtf_paginaactual = new javax.swing.JTextField();
        jbtn_siguiente = new javax.swing.JButton();
        jPanel5 = new javax.swing.JPanel();
        jbtn_actualizasurtido = new javax.swing.JButton();
        jLabel14 = new javax.swing.JLabel();
        jtf_obser_update = new javax.swing.JTextField();
        jbtn_observaciones = new javax.swing.JButton();
        jbtn_cancelar = new javax.swing.JButton();
        jcmbx_statusdocto = new javax.swing.JComboBox();
        jbtn_statusaplicacambios = new javax.swing.JButton();
        jPanel6 = new javax.swing.JPanel();
        jPanel7 = new javax.swing.JPanel();
        jtf_cliente = new javax.swing.JTextField();
        jLabel28 = new javax.swing.JLabel();
        jtf_observaciones1 = new javax.swing.JTextField();
        jtf_idcliente1 = new javax.swing.JTextField();
        jLabel30 = new javax.swing.JLabel();
        jtf_dompobla1 = new javax.swing.JTextField();
        jtf_cp = new javax.swing.JTextField();
        jtf_domcalle1 = new javax.swing.JTextField();
        jLabel34 = new javax.swing.JLabel();
        jLabel35 = new javax.swing.JLabel();
        jLabel36 = new javax.swing.JLabel();
        jLabel37 = new javax.swing.JLabel();
        jtf_domcolonia1 = new javax.swing.JTextField();
        jLabel38 = new javax.swing.JLabel();
        jtf_email2 = new javax.swing.JTextField();
        jtf_direccion2 = new javax.swing.JTextField();
        jLabel39 = new javax.swing.JLabel();
        jtf_rfc = new javax.swing.JTextField();
        jLabel40 = new javax.swing.JLabel();
        jtf_tel = new javax.swing.JTextField();
        jLabel41 = new javax.swing.JLabel();
        jLabel42 = new javax.swing.JLabel();
        jtf_atnventas = new javax.swing.JTextField();
        jLabel43 = new javax.swing.JLabel();
        jtf_atncobra = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        jtf_importeprecio = new javax.swing.JTextField();
        jLabel15 = new javax.swing.JLabel();
        jtf_importepreciomay = new javax.swing.JTextField();
        jcb_verfotos = new javax.swing.JCheckBox();
        jcbx_ordenarxnombre = new javax.swing.JCheckBox();
        jPanel2 = new javax.swing.JPanel();
        jbtn_salir = new javax.swing.JButton();
        jbtn_helpayudame = new javax.swing.JButton();
        jbtn_imprimir = new javax.swing.JButton();
        jbtn_imprimir1 = new javax.swing.JButton();
        jbtn_imprimir2 = new javax.swing.JButton();
        jPanel8 = new javax.swing.JPanel();
        jScrollPane4 = new javax.swing.JScrollPane();
        jepn_fotos1 = new javax.swing.JEditorPane();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jmni_salir = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();
        jmni_escape = new javax.swing.JMenuItem();
        jmni_imprimirfortra = new javax.swing.JMenuItem();
        jmni_formatoventa = new javax.swing.JMenuItem();
        jMenu3 = new javax.swing.JMenu();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(sie_invdis.Sie_invdisApp.class).getContext().getResourceMap(articulos_sie_traspaso_requisicion_detalle.class);
        setTitle(resourceMap.getString("Form.title")); // NOI18N
        setName("Form"); // NOI18N

        jTabbedPane2.setName("jTabbedPane2"); // NOI18N
        jTabbedPane2.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                jTabbedPane2StateChanged(evt);
            }
        });

        jPanel3.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jPanel3.setName("jPanel3"); // NOI18N

        jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
        jLabel5.setName("jLabel5"); // NOI18N

        tf_tiendasolicita.setEditable(false);
        tf_tiendasolicita.setName("tf_tiendasolicita"); // NOI18N
        tf_tiendasolicita.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                tf_tiendasolicitaActionPerformed(evt);
            }
        });

        jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
        jLabel4.setName("jLabel4"); // NOI18N

        tf_status.setEditable(false);
        tf_status.setName("tf_status"); // NOI18N

        jtf_foliotienda.setEditable(false);
        jtf_foliotienda.setName("jtf_foliotienda"); // NOI18N
        jtf_foliotienda.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtf_foliotiendaActionPerformed(evt);
            }
        });

        jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
        jLabel3.setName("jLabel3"); // NOI18N

        jLabel8.setText(resourceMap.getString("jLabel8.text")); // NOI18N
        jLabel8.setName("jLabel8"); // NOI18N

        jtf_fechasolicitatienda.setEditable(false);
        jtf_fechasolicitatienda.setName("jtf_fechasolicitatienda"); // NOI18N

        jLabel9.setText(resourceMap.getString("jLabel9.text")); // NOI18N
        jLabel9.setName("jLabel9"); // NOI18N

        jtf_almacenprovee.setEditable(false);
        jtf_almacenprovee.setName("jtf_almacenprovee"); // NOI18N

        jLabel10.setText(resourceMap.getString("jLabel10.text")); // NOI18N
        jLabel10.setName("jLabel10"); // NOI18N

        jLabel11.setText(resourceMap.getString("jLabel11.text")); // NOI18N
        jLabel11.setName("jLabel11"); // NOI18N

        jtf_fecharsurtido.setEditable(false);
        jtf_fecharsurtido.setName("jtf_fecharsurtido"); // NOI18N

        jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
        jLabel2.setName("jLabel2"); // NOI18N

        jtf_elaboro.setEditable(false);
        jtf_elaboro.setName("jtf_elaboro"); // NOI18N

        jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N
        jLabel7.setName("jLabel7"); // NOI18N

        jtf_fecharecepcion.setEditable(false);
        jtf_fecharecepcion.setName("jtf_fecharecepcion"); // NOI18N

        jScrollPane2.setName("jScrollPane2"); // NOI18N

        jep_observaenvio.setContentType(resourceMap.getString("jep_observaenvio.contentType")); // NOI18N
        jep_observaenvio.setEditable(false);
        jep_observaenvio.setName("jep_observaenvio"); // NOI18N
        jScrollPane2.setViewportView(jep_observaenvio);

        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N

        jLabel12.setText(resourceMap.getString("jLabel12.text")); // NOI18N
        jLabel12.setName("jLabel12"); // NOI18N

        jtf_piezaenvia.setEditable(false);
        jtf_piezaenvia.setName("jtf_piezaenvia"); // NOI18N

        jtf_piezasrecibidas.setEditable(false);
        jtf_piezasrecibidas.setName("jtf_piezasrecibidas"); // NOI18N

        jLabel13.setText(resourceMap.getString("jLabel13.text")); // NOI18N
        jLabel13.setName("jLabel13"); // NOI18N

        jtf_diferencia.setEditable(false);
        jtf_diferencia.setName("jtf_diferencia"); // NOI18N

        jtf_idproveedor.setEditable(false);
        jtf_idproveedor.setText(resourceMap.getString("jtf_idproveedor.text")); // NOI18N
        jtf_idproveedor.setName("jtf_idproveedor"); // NOI18N

        jTabbedPane1.setName("jTabbedPane1"); // NOI18N
        jTabbedPane1.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                jTabbedPane1StateChanged(evt);
            }
        });

        jPanel1.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
        jPanel1.setName("jPanel1"); // NOI18N

        jScrollPane1.setName("jScrollPane1"); // NOI18N

        jt_foliosdetalle.setModel(this.jtable_modelo_traspaso);
        jt_foliosdetalle.setName("jt_foliosdetalle"); // NOI18N
        jt_foliosdetalle.setRowHeight(22);
        // TODO add your handling code here:

        jt_foliosdetalle.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {

                // dioclick(evt);
                //System.out.println(" double click" );

            }
        });
        jScrollPane1.setViewportView(jt_foliosdetalle);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 894, Short.MAX_VALUE)
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 351, Short.MAX_VALUE)
        );

        jTabbedPane1.addTab(resourceMap.getString("jPanel1.TabConstraints.tabTitle"), jPanel1); // NOI18N

        jPanel4.setName("jPanel4"); // NOI18N

        jScrollPane3.setName("jScrollPane3"); // NOI18N

        jepn_fotos.setContentType(resourceMap.getString("jepn_fotos.contentType")); // NOI18N
        jepn_fotos.setText(resourceMap.getString("jepn_fotos.text")); // NOI18N
        jepn_fotos.setName("jepn_fotos"); // NOI18N
        jScrollPane3.setViewportView(jepn_fotos);

        jlbl_paginas.setText(resourceMap.getString("jlbl_paginas.text")); // NOI18N
        jlbl_paginas.setName("jlbl_paginas"); // NOI18N

        jbtn_anterior.setIcon(resourceMap.getIcon("jbtn_anterior.icon")); // NOI18N
        jbtn_anterior.setText(resourceMap.getString("jbtn_anterior.text")); // NOI18N
        jbtn_anterior.setName("jbtn_anterior"); // NOI18N
        jbtn_anterior.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtn_anteriorActionPerformed(evt);
            }
        });

        jtf_paginaactual.setEditable(false);
        jtf_paginaactual.setText(resourceMap.getString("jtf_paginaactual.text")); // NOI18N
        jtf_paginaactual.setName("jtf_paginaactual"); // NOI18N

        jbtn_siguiente.setIcon(resourceMap.getIcon("jbtn_siguiente.icon")); // NOI18N
        jbtn_siguiente.setText(resourceMap.getString("jbtn_siguiente.text")); // NOI18N
        jbtn_siguiente.setName("jbtn_siguiente"); // NOI18N
        jbtn_siguiente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtn_siguienteActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addGap(259, 259, 259)
                .addComponent(jlbl_paginas)
                .addGap(27, 27, 27)
                .addComponent(jbtn_anterior)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jtf_paginaactual, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jbtn_siguiente)
                .addContainerGap(326, Short.MAX_VALUE))
            .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 896, Short.MAX_VALUE)
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
                .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 322, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jlbl_paginas)
                    .addComponent(jbtn_anterior)
                    .addComponent(jbtn_siguiente)
                    .addComponent(jtf_paginaactual, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );

        jTabbedPane1.addTab(resourceMap.getString("jPanel4.TabConstraints.tabTitle"), jPanel4); // NOI18N

        jPanel5.setName("jPanel5"); // NOI18N

        jbtn_actualizasurtido.setIcon(resourceMap.getIcon("jbtn_actualizasurtido.icon")); // NOI18N
        jbtn_actualizasurtido.setText(resourceMap.getString("jbtn_actualizasurtido.text")); // NOI18N
        jbtn_actualizasurtido.setToolTipText(resourceMap.getString("jbtn_actualizasurtido.toolTipText")); // NOI18N
        jbtn_actualizasurtido.setName("jbtn_actualizasurtido"); // NOI18N
        jbtn_actualizasurtido.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtn_actualizasurtidoActionPerformed(evt);
            }
        });

        jLabel14.setText(resourceMap.getString("jLabel14.text")); // NOI18N
        jLabel14.setName("jLabel14"); // NOI18N

        jtf_obser_update.setText(resourceMap.getString("jtf_obser_update.text")); // NOI18N
        jtf_obser_update.setName("jtf_obser_update"); // NOI18N

        jbtn_observaciones.setIcon(resourceMap.getIcon("jbtn_observaciones.icon")); // NOI18N
        jbtn_observaciones.setText(resourceMap.getString("jbtn_observaciones.text")); // NOI18N
        jbtn_observaciones.setName("jbtn_observaciones"); // NOI18N
        jbtn_observaciones.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtn_observacionesActionPerformed(evt);
            }
        });

        jbtn_cancelar.setIcon(resourceMap.getIcon("jbtn_cancelar.icon")); // NOI18N
        jbtn_cancelar.setText(resourceMap.getString("jbtn_cancelar.text")); // NOI18N
        jbtn_cancelar.setName("jbtn_cancelar"); // NOI18N
        jbtn_cancelar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtn_cancelarActionPerformed(evt);
            }
        });

        jcmbx_statusdocto.setToolTipText(resourceMap.getString("jcmbx_statusdocto.toolTipText")); // NOI18N
        jcmbx_statusdocto.setName("jcmbx_statusdocto"); // NOI18N
        jcmbx_statusdocto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jcmbx_statusdoctoActionPerformed(evt);
            }
        });

        jbtn_statusaplicacambios.setIcon(resourceMap.getIcon("jbtn_statusaplicacambios.icon")); // NOI18N
        jbtn_statusaplicacambios.setText(resourceMap.getString("jbtn_statusaplicacambios.text")); // NOI18N
        jbtn_statusaplicacambios.setName("jbtn_statusaplicacambios"); // NOI18N
        jbtn_statusaplicacambios.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtn_statusaplicacambiosActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jbtn_actualizasurtido)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(jLabel14)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jtf_obser_update, javax.swing.GroupLayout.PREFERRED_SIZE, 424, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jbtn_observaciones))
                    .addComponent(jbtn_cancelar)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(jcmbx_statusdocto, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jbtn_statusaplicacambios)))
                .addContainerGap(278, Short.MAX_VALUE))
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jbtn_actualizasurtido)
                .addGap(37, 37, 37)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel14)
                    .addComponent(jtf_obser_update, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jbtn_observaciones))
                .addGap(34, 34, 34)
                .addComponent(jbtn_cancelar)
                .addGap(32, 32, 32)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jcmbx_statusdocto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jbtn_statusaplicacambios))
                .addContainerGap(139, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab(resourceMap.getString("jPanel5.TabConstraints.tabTitle"), jPanel5); // NOI18N

        jPanel6.setName("jPanel6"); // NOI18N

        jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel7.border.title"))); // NOI18N
        jPanel7.setName("jPanel7"); // NOI18N

        jtf_cliente.setEditable(false);
        jtf_cliente.setName("jtf_cliente"); // NOI18N
        jtf_cliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtf_clienteActionPerformed(evt);
            }
        });

        jLabel28.setText(resourceMap.getString("jLabel28.text")); // NOI18N
        jLabel28.setName("jLabel28"); // NOI18N

        jtf_observaciones1.setName("jtf_observaciones1"); // NOI18N
        jtf_observaciones1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtf_observaciones1ActionPerformed(evt);
            }
        });

        jtf_idcliente1.setEditable(false);
        jtf_idcliente1.setText(resourceMap.getString("jtf_idcliente1.text")); // NOI18N
        jtf_idcliente1.setAutoscrolls(false);
        jtf_idcliente1.setName("jtf_idcliente1"); // NOI18N

        jLabel30.setText(resourceMap.getString("jLabel30.text")); // NOI18N
        jLabel30.setName("jLabel30"); // NOI18N

        jtf_dompobla1.setEditable(false);
        jtf_dompobla1.setName("jtf_dompobla1"); // NOI18N
        jtf_dompobla1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtf_dompobla1ActionPerformed(evt);
            }
        });

        jtf_cp.setName("jtf_cp"); // NOI18N
        jtf_cp.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtf_cpActionPerformed(evt);
            }
        });

        jtf_domcalle1.setEditable(false);
        jtf_domcalle1.setName("jtf_domcalle1"); // NOI18N
        jtf_domcalle1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtf_domcalle1ActionPerformed(evt);
            }
        });

        jLabel34.setText(resourceMap.getString("jLabel34.text")); // NOI18N
        jLabel34.setName("jLabel34"); // NOI18N

        jLabel35.setText(resourceMap.getString("jLabel35.text")); // NOI18N
        jLabel35.setName("jLabel35"); // NOI18N

        jLabel36.setText(resourceMap.getString("jLabel36.text")); // NOI18N
        jLabel36.setName("jLabel36"); // NOI18N

        jLabel37.setText(resourceMap.getString("jLabel37.text")); // NOI18N
        jLabel37.setName("jLabel37"); // NOI18N

        jtf_domcolonia1.setEditable(false);
        jtf_domcolonia1.setName("jtf_domcolonia1"); // NOI18N
        jtf_domcolonia1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtf_domcolonia1ActionPerformed(evt);
            }
        });

        jLabel38.setText(resourceMap.getString("jLabel38.text")); // NOI18N
        jLabel38.setName("jLabel38"); // NOI18N

        jtf_email2.setEditable(false);
        jtf_email2.setName("jtf_email2"); // NOI18N
        jtf_email2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtf_email2ActionPerformed(evt);
            }
        });

        jtf_direccion2.setName("jtf_direccion2"); // NOI18N
        jtf_direccion2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtf_direccion2ActionPerformed(evt);
            }
        });

        jLabel39.setText(resourceMap.getString("jLabel39.text")); // NOI18N
        jLabel39.setName("jLabel39"); // NOI18N

        jtf_rfc.setName("jtf_rfc"); // NOI18N
        jtf_rfc.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtf_rfcActionPerformed(evt);
            }
        });

        jLabel40.setText(resourceMap.getString("jLabel40.text")); // NOI18N
        jLabel40.setName("jLabel40"); // NOI18N

        jtf_tel.setName("jtf_tel"); // NOI18N
        jtf_tel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtf_telActionPerformed(evt);
            }
        });

        jLabel41.setText(resourceMap.getString("jLabel41.text")); // NOI18N
        jLabel41.setName("jLabel41"); // NOI18N

        jLabel42.setText(resourceMap.getString("jLabel42.text")); // NOI18N
        jLabel42.setName("jLabel42"); // NOI18N

        jtf_atnventas.setName("jtf_atnventas"); // NOI18N
        jtf_atnventas.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtf_atnventasActionPerformed(evt);
            }
        });

        jLabel43.setText(resourceMap.getString("jLabel43.text")); // NOI18N
        jLabel43.setName("jLabel43"); // NOI18N

        jtf_atncobra.setName("jtf_atncobra"); // NOI18N
        jtf_atncobra.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtf_atncobraActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addComponent(jtf_idcliente1, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel34, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jtf_cliente, javax.swing.GroupLayout.PREFERRED_SIZE, 351, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel37)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jtf_domcalle1, javax.swing.GroupLayout.PREFERRED_SIZE, 315, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addComponent(jLabel35)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jtf_observaciones1, javax.swing.GroupLayout.PREFERRED_SIZE, 565, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel7Layout.createSequentialGroup()
                                .addComponent(jLabel42)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jtf_atnventas, javax.swing.GroupLayout.DEFAULT_SIZE, 125, Short.MAX_VALUE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))
                            .addGroup(jPanel7Layout.createSequentialGroup()
                                .addGap(4, 4, 4)
                                .addComponent(jLabel30)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jtf_cp, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jLabel40)))
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()
                                .addComponent(jtf_rfc, javax.swing.GroupLayout.DEFAULT_SIZE, 134, Short.MAX_VALUE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel41)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jtf_tel, javax.swing.GroupLayout.PREFERRED_SIZE, 197, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel39)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jtf_direccion2, javax.swing.GroupLayout.PREFERRED_SIZE, 178, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()
                                .addComponent(jLabel43)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jtf_atncobra, javax.swing.GroupLayout.PREFERRED_SIZE, 265, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(291, 291, 291))))
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel7Layout.createSequentialGroup()
                                .addComponent(jLabel28)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jtf_domcolonia1))
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel7Layout.createSequentialGroup()
                                .addComponent(jLabel36)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jtf_dompobla1, javax.swing.GroupLayout.PREFERRED_SIZE, 291, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel38)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jtf_email2, javax.swing.GroupLayout.PREFERRED_SIZE, 265, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jtf_idcliente1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel34)
                    .addComponent(jtf_cliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel37)
                    .addComponent(jtf_domcalle1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel28)
                    .addComponent(jtf_domcolonia1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel36)
                    .addComponent(jtf_dompobla1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jtf_email2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel38))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 10, Short.MAX_VALUE)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jtf_cp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel40)
                    .addComponent(jLabel30)
                    .addComponent(jtf_tel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel41)
                    .addComponent(jtf_rfc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jtf_direccion2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel39))
                .addGap(18, 18, 18)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jtf_atnventas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel42)
                    .addComponent(jLabel43)
                    .addComponent(jtf_atncobra, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(4, 4, 4)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel35)
                    .addComponent(jtf_observaciones1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(27, 27, 27))
        );

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(29, Short.MAX_VALUE))
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(100, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab(resourceMap.getString("jPanel6.TabConstraints.tabTitle"), jPanel6); // NOI18N

        jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N
        jLabel6.setName("jLabel6"); // NOI18N

        jtf_importeprecio.setEditable(false);
        jtf_importeprecio.setText(resourceMap.getString("jtf_importeprecio.text")); // NOI18N
        jtf_importeprecio.setName("jtf_importeprecio"); // NOI18N

        jLabel15.setText(resourceMap.getString("jLabel15.text")); // NOI18N
        jLabel15.setName("jLabel15"); // NOI18N

        jtf_importepreciomay.setEditable(false);
        jtf_importepreciomay.setName("jtf_importepreciomay"); // NOI18N

        jcb_verfotos.setText(resourceMap.getString("jcb_verfotos.text")); // NOI18N
        jcb_verfotos.setToolTipText(resourceMap.getString("jcb_verfotos.toolTipText")); // NOI18N
        jcb_verfotos.setName("jcb_verfotos"); // NOI18N
        jcb_verfotos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jcb_verfotosActionPerformed(evt);
            }
        });

        jcbx_ordenarxnombre.setText(resourceMap.getString("jcbx_ordenarxnombre.text")); // NOI18N
        jcbx_ordenarxnombre.setName("jcbx_ordenarxnombre"); // NOI18N
        jcbx_ordenarxnombre.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jcbx_ordenarxnombreActionPerformed(evt);
            }
        });

        jPanel2.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jPanel2.setName("jPanel2"); // NOI18N

        jbtn_salir.setIcon(resourceMap.getIcon("jbtn_salir.icon")); // NOI18N
        jbtn_salir.setText(resourceMap.getString("jbtn_salir.text")); // NOI18N
        jbtn_salir.setName("jbtn_salir"); // NOI18N
        jbtn_salir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtn_salirActionPerformed(evt);
            }
        });

        jbtn_helpayudame.setIcon(resourceMap.getIcon("jbtn_helpayudame.icon")); // NOI18N
        jbtn_helpayudame.setText(resourceMap.getString("jbtn_helpayudame.text")); // NOI18N
        jbtn_helpayudame.setName("jbtn_helpayudame"); // NOI18N
        jbtn_helpayudame.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtn_helpayudameActionPerformed(evt);
            }
        });

        jbtn_imprimir.setIcon(resourceMap.getIcon("jbtn_imprimir.icon")); // NOI18N
        jbtn_imprimir.setText(resourceMap.getString("jbtn_imprimir.text")); // NOI18N
        jbtn_imprimir.setName("jbtn_imprimir"); // NOI18N
        jbtn_imprimir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtn_imprimirActionPerformed(evt);
            }
        });

        jbtn_imprimir1.setIcon(resourceMap.getIcon("jbtn_imprimir1.icon")); // NOI18N
        jbtn_imprimir1.setText(resourceMap.getString("jbtn_imprimir1.text")); // NOI18N
        jbtn_imprimir1.setName("jbtn_imprimir1"); // NOI18N
        jbtn_imprimir1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtn_imprimir1ActionPerformed(evt);
            }
        });

        jbtn_imprimir2.setText(resourceMap.getString("jbtn_imprimir2.text")); // NOI18N
        jbtn_imprimir2.setName("jbtn_imprimir2"); // NOI18N
        jbtn_imprimir2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtn_imprimir2ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addComponent(jbtn_imprimir)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jbtn_imprimir1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jbtn_imprimir2, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jbtn_salir)
                .addGap(149, 149, 149)
                .addComponent(jbtn_helpayudame)
                .addContainerGap(197, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jbtn_imprimir)
                .addComponent(jbtn_helpayudame)
                .addComponent(jbtn_salir)
                .addComponent(jbtn_imprimir1)
                .addComponent(jbtn_imprimir2))
        );

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                .addComponent(jLabel3)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jtf_foliotienda, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(jLabel4)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(tf_status, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel3Layout.createSequentialGroup()
                                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel3Layout.createSequentialGroup()
                                                .addComponent(jLabel5)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                                .addComponent(tf_tiendasolicita, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                                .addComponent(jLabel8)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(jtf_fechasolicitatienda, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addGroup(jPanel3Layout.createSequentialGroup()
                                                .addComponent(jLabel9)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(jtf_almacenprovee, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addGap(18, 18, 18)
                                                .addComponent(jLabel11)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(jtf_fecharsurtido, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                        .addGap(31, 31, 31)
                                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel7)
                                            .addComponent(jLabel2)))
                                    .addGroup(jPanel3Layout.createSequentialGroup()
                                        .addComponent(jLabel10)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 385, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel3Layout.createSequentialGroup()
                                        .addComponent(jtf_idproveedor, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(58, 58, 58)
                                        .addComponent(jLabel13)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(jtf_diferencia, javax.swing.GroupLayout.DEFAULT_SIZE, 268, Short.MAX_VALUE))
                                    .addGroup(jPanel3Layout.createSequentialGroup()
                                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                            .addComponent(jtf_fecharecepcion)
                                            .addComponent(jtf_elaboro, javax.swing.GroupLayout.DEFAULT_SIZE, 124, Short.MAX_VALUE))
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel1)
                                            .addComponent(jLabel12))
                                        .addGap(1, 1, 1)
                                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jtf_piezasrecibidas, javax.swing.GroupLayout.DEFAULT_SIZE, 189, Short.MAX_VALUE)
                                            .addComponent(jtf_piezaenvia, javax.swing.GroupLayout.DEFAULT_SIZE, 189, Short.MAX_VALUE)))))))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel3Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabel6)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jtf_importeprecio, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(5, 5, 5)
                        .addComponent(jLabel15)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jtf_importepreciomay, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jcb_verfotos)
                        .addGap(42, 42, 42)
                        .addComponent(jcbx_ordenarxnombre))
                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
            .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 901, Short.MAX_VALUE)
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jtf_foliotienda, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel4)
                    .addComponent(tf_status, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(tf_tiendasolicita, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel8)
                    .addComponent(jtf_fechasolicitatienda, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel2)
                    .addComponent(jtf_elaboro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel1)
                    .addComponent(jtf_piezaenvia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel9)
                        .addComponent(jtf_almacenprovee, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel11)
                        .addComponent(jtf_fecharsurtido, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel7)
                        .addComponent(jtf_fecharecepcion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel12)
                        .addComponent(jtf_piezasrecibidas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGap(18, 18, 18)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel13)
                            .addComponent(jtf_diferencia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel3Layout.createSequentialGroup()
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jScrollPane2))
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel3Layout.createSequentialGroup()
                            .addGap(14, 14, 14)
                            .addComponent(jLabel10)))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGap(18, 18, 18)
                        .addComponent(jtf_idproveedor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(18, 18, 18)
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 381, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(jtf_importeprecio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jcb_verfotos)
                    .addComponent(jLabel15)
                    .addComponent(jtf_importepreciomay, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jcbx_ordenarxnombre))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        jTabbedPane2.addTab(resourceMap.getString("jPanel3.TabConstraints.tabTitle"), jPanel3); // NOI18N

        jPanel8.setName("jPanel8"); // NOI18N

        jScrollPane4.setName("jScrollPane4"); // NOI18N

        jepn_fotos1.setContentType(resourceMap.getString("jepn_fotos1.contentType")); // NOI18N
        jepn_fotos1.setText(resourceMap.getString("jepn_fotos1.text")); // NOI18N
        jepn_fotos1.setName("jepn_fotos1"); // NOI18N
        jScrollPane4.setViewportView(jepn_fotos1);

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 905, Short.MAX_VALUE)
            .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jScrollPane4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 905, Short.MAX_VALUE))
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 585, Short.MAX_VALUE)
            .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 585, Short.MAX_VALUE))
        );

        jTabbedPane2.addTab(resourceMap.getString("jPanel8.TabConstraints.tabTitle"), jPanel8); // NOI18N

        jMenuBar1.setName("jMenuBar1"); // NOI18N

        jMenu1.setText(resourceMap.getString("jMenu1.text")); // NOI18N
        jMenu1.setName("jMenu1"); // NOI18N

        jmni_salir.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.ALT_MASK));
        jmni_salir.setText(resourceMap.getString("jmni_salir.text")); // NOI18N
        jmni_salir.setName("jmni_salir"); // NOI18N
        jmni_salir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmni_salirActionPerformed(evt);
            }
        });
        jMenu1.add(jmni_salir);

        jMenuBar1.add(jMenu1);

        jMenu2.setText(resourceMap.getString("jMenu2.text")); // NOI18N
        jMenu2.setName("jMenu2"); // NOI18N

        jmni_escape.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ESCAPE, 0));
        jmni_escape.setText(resourceMap.getString("jmni_escape.text")); // NOI18N
        jmni_escape.setName("jmni_escape"); // NOI18N
        jmni_escape.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmni_escapeActionPerformed(evt);
            }
        });
        jMenu2.add(jmni_escape);

        jmni_imprimirfortra.setText(resourceMap.getString("jmni_imprimirfortra.text")); // NOI18N
        jmni_imprimirfortra.setName("jmni_imprimirfortra"); // NOI18N
        jmni_imprimirfortra.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmni_imprimirfortraActionPerformed(evt);
            }
        });
        jMenu2.add(jmni_imprimirfortra);

        jmni_formatoventa.setText(resourceMap.getString("jmni_formatoventa.text")); // NOI18N
        jmni_formatoventa.setName("jmni_formatoventa"); // NOI18N
        jmni_formatoventa.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmni_formatoventaActionPerformed(evt);
            }
        });
        jMenu2.add(jmni_formatoventa);

        jMenuBar1.add(jMenu2);

        jMenu3.setText(resourceMap.getString("jMenu3.text")); // NOI18N
        jMenu3.setName("jMenu3"); // NOI18N
        jMenuBar1.add(jMenu3);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jTabbedPane2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 910, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jTabbedPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 613, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void tf_tiendasolicitaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tf_tiendasolicitaActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_tf_tiendasolicitaActionPerformed

    private void jtf_foliotiendaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_foliotiendaActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jtf_foliotiendaActionPerformed

    private void jmni_salirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_salirActionPerformed
        // TODO add your handling code here:
       if(JOptionPane.showConfirmDialog(null, "Desea Salir?")==0) {
             this.dispose();
        }
    }//GEN-LAST:event_jmni_salirActionPerformed

    private void jbtn_salirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_salirActionPerformed
    this.jmni_salirActionPerformed(evt);
}//GEN-LAST:event_jbtn_salirActionPerformed

    private void jbtn_helpayudameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_helpayudameActionPerformed
        // TODO add your handling code here:
        //this.ayuda();
}//GEN-LAST:event_jbtn_helpayudameActionPerformed

    private void jbtn_imprimirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_imprimirActionPerformed
        // TODO add your handling code here:
              float filas =this.jtable_modelo_traspaso.getRowCount();
        float paginas = filas /30;
        int ni=0;
          System.out.println("Hola numero de paginas"+paginas+" filas"+filas);
        for(ni=0;ni<paginas;ni++)
             {
             System.out.println("Hola numero de paginas"+ni);
                 //this.imprimir(ni,paginas);
                  this.imprimir(ni,paginas);
             }

        
}//GEN-LAST:event_jbtn_imprimirActionPerformed

    private void jcb_verfotosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcb_verfotosActionPerformed
        // TODO add your handling code here:
        if(this.jcb_verfotos.isSelected()==true) {
            this.verfotosestereporte();
        } else {
            this.quitarfotosestereporte();
        }

    }//GEN-LAST:event_jcb_verfotosActionPerformed

    private void jmni_escapeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_escapeActionPerformed
        // TODO add your handling code here:
        this.jmni_salirActionPerformed(evt);
    }//GEN-LAST:event_jmni_escapeActionPerformed

    private void jbtn_actualizasurtidoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_actualizasurtidoActionPerformed
        // TODO add your handling code here:
        String retorno="",texto="";
        if(JOptionPane.showConfirmDialog(null, "Desea Actualizar Fecha Surtido?")==0) {
        texto="select * from x1distribucion_almacen_traspa_requi_actualiza(1,'"+this.jtf_foliotienda.getText().toString()+"','"+this.jtf_obser_update.getText().trim().replace(",", "")+"');";
        System.out.println(texto);
            try
                {
                    rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
                    while (rs.next())
                        {
                            retorno=rs.getString(1);
                        }
                }
                catch(Exception e)
                    {
                        System.out.println(e.getMessage());
                    }
                    if (retorno.equals("1"))
                                     {

                                     }
        }
}//GEN-LAST:event_jbtn_actualizasurtidoActionPerformed

    private void jbtn_observacionesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_observacionesActionPerformed
        // TODO add your handling code here:
        String retorno="",texto="";
        if(JOptionPane.showConfirmDialog(null, "Desea Actualizar Observaciones?")==0) {
        texto="select * from x1distribucion_almacen_traspa_requi_actualiza(2,'"+this.jtf_foliotienda.getText().toString()+"','"+this.jtf_obser_update.getText().trim().replace(",", "").toUpperCase()+"');";
        System.out.println(texto);
            try
                {
                    rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
                    while (rs.next())
                        {
                            retorno=rs.getString(1);
                        }
                }
                catch(Exception e)
                    {
                        System.out.println(e.getMessage());
                    }
                    if (retorno.equals("1"))
                                     {

                                     }
        }
    }//GEN-LAST:event_jbtn_observacionesActionPerformed

    private void jbtn_cancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_cancelarActionPerformed
        // TODO add your handling code here:
                String retorno="",texto="";
        if(JOptionPane.showConfirmDialog(null, "Desea Cancelar Documento?")==0) {
        texto="select * from x1distribucion_almacen_traspa_requi_actualiza(3,'"+this.jtf_foliotienda.getText().toString()+"','"+this.jtf_obser_update.getText().trim().replace(",", "")+"');";
        System.out.println(texto);
            try
                {
                    rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
                    while (rs.next())
                        {
                            retorno=rs.getString(1);
                        }
                }
                catch(Exception e)
                    {
                        System.out.println(e.getMessage());
                    }
                    if (retorno.equals("1"))
                                     {

                                     }
        }
    }//GEN-LAST:event_jbtn_cancelarActionPerformed

    private void jbtn_imprimir1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_imprimir1ActionPerformed
        // TODO add your handling code here:
         float filas =this.jtable_modelo_traspaso.getRowCount();
        float paginas = filas /30;
        int ni=0;
          System.out.println("Hola numero de paginas"+paginas+" filas"+filas);
        for(ni=0;ni<paginas;ni++)
             {
             System.out.println("Hola numero de paginas"+ni);
                 //this.imprimir(ni,paginas);
                  this.imprimirlugar(ni,paginas);
             }
               
    }//GEN-LAST:event_jbtn_imprimir1ActionPerformed

    private void jTabbedPane1StateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jTabbedPane1StateChanged
        // TODO add your handling code here:
         int indexactual=this.jTabbedPane1.getSelectedIndex();
         if((indexactual==1) && (yacarguefoto==0))
            {
             yacarguefoto=1;
             this.carga_datos_fotospaginacion(Integer.valueOf(this.jtf_paginaactual.getText().toString()));
         }
         if((indexactual==3) && (yacarguecliente==0))
            {
             yacarguecliente=1;
             String idcliente[]=this.tf_tiendasolicita.getText().split(":");
             this.carga_datos_clientesactualiza(2,idcliente[0]);
         }


    }//GEN-LAST:event_jTabbedPane1StateChanged

    private void jmni_imprimirfortraActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_imprimirfortraActionPerformed
        // TODO add your handling code here:
        float filas =this.jtable_modelo_traspaso.getRowCount();
        float paginas = filas /30;
        int ni=0;
          System.out.println("Hola numero de paginas"+paginas+" filas"+filas);
        for(ni=0;ni<paginas;ni++)
             {
             System.out.println("Hola numero de paginas"+ni);
                 //this.imprimir(ni,paginas);
                  this.imprimirfortras(ni,paginas);
                  
             }
}//GEN-LAST:event_jmni_imprimirfortraActionPerformed

    private void jbtn_anteriorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_anteriorActionPerformed
        // TODO add your handling code here:
        this.jtf_paginaactual.setText(String.valueOf(Integer.valueOf(this.jtf_paginaactual.getText().toString())-1));
        System.out.println("Esta es la pagina que mando"+this.jtf_paginaactual.getText());
        this.carga_datos_fotospaginacion(Integer.valueOf(this.jtf_paginaactual.getText().toString()));
    }//GEN-LAST:event_jbtn_anteriorActionPerformed

    private void jbtn_siguienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_siguienteActionPerformed
        // TODO add your handling code here:
        this.jtf_paginaactual.setText(String.valueOf(Integer.valueOf(this.jtf_paginaactual.getText().toString())+1));
        System.out.println("Esta es la pagina que mando"+this.jtf_paginaactual.getText());
        this.carga_datos_fotospaginacion(Integer.valueOf(this.jtf_paginaactual.getText().toString()));

    }//GEN-LAST:event_jbtn_siguienteActionPerformed

    private void jmni_formatoventaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_formatoventaActionPerformed
        // TODO add your handling code here:
        float filas =this.jtable_modelo_traspaso.getRowCount();
        float paginas = filas /30;
        int ni=0;
          System.out.println("Hola numero de paginas"+paginas+" filas"+filas);
        for(ni=0;ni<paginas;ni++)
             {
             System.out.println("Hola numero de paginas"+ni);
                 //this.imprimir(ni,paginas);
                  //this.imprimirfortras(ni,paginas);
                  this.imprimirformayoreo(ni, paginas);

             }
    }//GEN-LAST:event_jmni_formatoventaActionPerformed

    private void jcbx_ordenarxnombreActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcbx_ordenarxnombreActionPerformed
        // TODO add your handling code here:
               if(JOptionPane.showConfirmDialog(null, "Desea Ordenar Por Nombre?")==0) {
                this.carga_datos_detalle(4,this.jtf_foliotienda.getText());
               }
                
    }//GEN-LAST:event_jcbx_ordenarxnombreActionPerformed

    private void jtf_clienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_clienteActionPerformed
        // TODO add your handling code here:
        this.jtf_domcalle1.requestFocus();
}//GEN-LAST:event_jtf_clienteActionPerformed

    private void jtf_observaciones1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_observaciones1ActionPerformed
        // TODO add your handling code here:
       
}//GEN-LAST:event_jtf_observaciones1ActionPerformed

    private void jtf_dompobla1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_dompobla1ActionPerformed
        // TODO add your handling code here:
        this.jtf_email2.requestFocus();
}//GEN-LAST:event_jtf_dompobla1ActionPerformed

    private void jtf_cpActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_cpActionPerformed
        // TODO add your handling code here:
        this.jtf_rfc.requestFocus();
}//GEN-LAST:event_jtf_cpActionPerformed

    private void jtf_domcalle1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_domcalle1ActionPerformed
        // TODO add your handling code here:
        this.jtf_domcolonia1.requestFocus();
}//GEN-LAST:event_jtf_domcalle1ActionPerformed

    private void jtf_domcolonia1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_domcolonia1ActionPerformed
        // TODO add your handling code here:
        this.jtf_dompobla1.requestFocus();
}//GEN-LAST:event_jtf_domcolonia1ActionPerformed

    private void jtf_email2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_email2ActionPerformed
        // TODO add your handling code here:
        this.jtf_cp.requestFocus();
}//GEN-LAST:event_jtf_email2ActionPerformed

    private void jtf_direccion2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_direccion2ActionPerformed
        // TODO add your handling code here:
        this.jtf_atnventas.requestFocus();
}//GEN-LAST:event_jtf_direccion2ActionPerformed

    private void jtf_rfcActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_rfcActionPerformed
        // TODO add your handling code here:
        this.jtf_tel.requestFocus();
}//GEN-LAST:event_jtf_rfcActionPerformed

    private void jtf_telActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_telActionPerformed
        // TODO add your handling code here:
        this.jtf_direccion2.requestFocus();
}//GEN-LAST:event_jtf_telActionPerformed

    private void jtf_atnventasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_atnventasActionPerformed
        // TODO add your handling code here:
        this.jtf_atncobra.requestFocus();
}//GEN-LAST:event_jtf_atnventasActionPerformed

    private void jtf_atncobraActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_atncobraActionPerformed
        // TODO add your handling code here:
        this.jtf_observaciones1.requestFocus();
}//GEN-LAST:event_jtf_atncobraActionPerformed

    private void jcmbx_statusdoctoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcmbx_statusdoctoActionPerformed
        // TODO add your handling code here:

}//GEN-LAST:event_jcmbx_statusdoctoActionPerformed

    private void jbtn_statusaplicacambiosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_statusaplicacambiosActionPerformed
        // TODO add your handling code here:
        String retorno="",texto="",status[]=null;
        status=this.jcmbx_statusdocto.getSelectedItem().toString().split(":");
        if(JOptionPane.showConfirmDialog(null, "Desea Cambiar Status A : "+status[1]+"?")==0)
            {
                texto="select * from x1distribucion_almacen_traspa_requi_actualiza(4,'"+this.jtf_foliotienda.getText().toString()+"','"+status[0]+"');";
                System.out.println(texto);
                try
                    {
                    rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
                    while (rs.next())
                        {
                            retorno=rs.getString(1);
                        }
                    }
                catch(Exception e)
                    {
                        System.out.println(e.getMessage());
                    }
            }
}//GEN-LAST:event_jbtn_statusaplicacambiosActionPerformed

    private void jTabbedPane2StateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jTabbedPane2StateChanged
        // TODO add your handling code here:
        if(controltab>0)
            {
                this.carga_datos_fotospaginacioncompleto(0);
            }
    }//GEN-LAST:event_jTabbedPane2StateChanged

    private void jbtn_imprimir2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_imprimir2ActionPerformed
        // TODO add your handling code here:
        float filas =this.jtable_modelo_traspaso.getRowCount();
        float paginas = filas /50;
        int ni=0;
          System.out.println("Hola numero de paginas"+paginas+" filas"+filas);
        for(ni=0;ni<paginas;ni++)
             {
             System.out.println("Hola numero de paginas"+ni);
                 //this.imprimir(ni,paginas);
                  this.imprimircarta(ni,paginas);
             }
    }//GEN-LAST:event_jbtn_imprimir2ActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                 new articulos_sie_traspaso_requisicion_detalle().setVisible(true);
                //articulos_sie_traspaso_requisicion_detalle dialog = new articulos_sie_traspaso_requisicion_detalle(new javax.swing.JFrame(), true);
                //dialog.addWindowListener(new java.awt.event.WindowAdapter() {
                //    public void windowClosing(java.awt.event.WindowEvent e) {
                //        System.exit(0);
                //    }
                //});
                //dialog.setVisible(true);

            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel41;
    private javax.swing.JLabel jLabel42;
    private javax.swing.JLabel jLabel43;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenu jMenu3;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTabbedPane jTabbedPane2;
    private javax.swing.JButton jbtn_actualizasurtido;
    private javax.swing.JButton jbtn_anterior;
    private javax.swing.JButton jbtn_cancelar;
    private javax.swing.JButton jbtn_helpayudame;
    private javax.swing.JButton jbtn_imprimir;
    private javax.swing.JButton jbtn_imprimir1;
    private javax.swing.JButton jbtn_imprimir2;
    private javax.swing.JButton jbtn_observaciones;
    private javax.swing.JButton jbtn_salir;
    private javax.swing.JButton jbtn_siguiente;
    private javax.swing.JButton jbtn_statusaplicacambios;
    private javax.swing.JCheckBox jcb_verfotos;
    private javax.swing.JCheckBox jcbx_ordenarxnombre;
    private javax.swing.JComboBox jcmbx_statusdocto;
    private javax.swing.JEditorPane jep_observaenvio;
    private javax.swing.JEditorPane jepn_fotos;
    private javax.swing.JEditorPane jepn_fotos1;
    private javax.swing.JLabel jlbl_paginas;
    private javax.swing.JMenuItem jmni_escape;
    private javax.swing.JMenuItem jmni_formatoventa;
    private javax.swing.JMenuItem jmni_imprimirfortra;
    private javax.swing.JMenuItem jmni_salir;
    private javax.swing.JTable jt_foliosdetalle;
    private javax.swing.JTextField jtf_almacenprovee;
    private javax.swing.JTextField jtf_atncobra;
    private javax.swing.JTextField jtf_atnventas;
    private javax.swing.JTextField jtf_cliente;
    private javax.swing.JTextField jtf_cp;
    private javax.swing.JTextField jtf_diferencia;
    private javax.swing.JTextField jtf_direccion2;
    private javax.swing.JTextField jtf_domcalle1;
    private javax.swing.JTextField jtf_domcolonia1;
    private javax.swing.JTextField jtf_dompobla1;
    private javax.swing.JTextField jtf_elaboro;
    private javax.swing.JTextField jtf_email2;
    private javax.swing.JTextField jtf_fecharecepcion;
    private javax.swing.JTextField jtf_fecharsurtido;
    private javax.swing.JTextField jtf_fechasolicitatienda;
    private javax.swing.JTextField jtf_foliotienda;
    private javax.swing.JTextField jtf_idcliente1;
    private javax.swing.JTextField jtf_idproveedor;
    private javax.swing.JTextField jtf_importeprecio;
    private javax.swing.JTextField jtf_importepreciomay;
    private javax.swing.JTextField jtf_obser_update;
    private javax.swing.JTextField jtf_observaciones1;
    private javax.swing.JTextField jtf_paginaactual;
    private javax.swing.JTextField jtf_piezaenvia;
    private javax.swing.JTextField jtf_piezasrecibidas;
    private javax.swing.JTextField jtf_rfc;
    private javax.swing.JTextField jtf_tel;
    private javax.swing.JTextField tf_status;
    private javax.swing.JTextField tf_tiendasolicita;
    // End of variables declaration//GEN-END:variables
    private articulos_sie_traspaso_imprimir objimpresora;
}
